InterestRate.getRate   A
last analyzed

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
1
import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
2
3
@Entity()
4
export class InterestRate {
5
  @PrimaryGeneratedColumn('uuid')
6
  private id: string;
7
8
  @Column({ type: 'integer', nullable: false, comment: 'Stored in base 100' })
9
  private rate: number;
10
11
  @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
12
  private createdAt: Date;
13
14
  constructor(rate: number) {
15
    this.rate = rate;
16
  }
17
18
  public getId(): string {
19
    return this.id;
20
  }
21
22
  public getRate(): number {
23
    return this.rate;
24
  }
25
}
26